
namespace Admin2025.Domain.Repositories;

public interface IRespository<T>
{
    IQueryable<T> Table { get; }
    Task<IEnumerable<T>> GetAllAsync();

    Task<T?> GetByIdAsync(Guid id);

    Task<T> CreateAsync(T entity);
    Task UpdateAsync(T entity);
    Task DeleteAsync(T entity);

    Task<IQueryable<T>> GetPagedAsync(int pageIndex, int pageSize);
}
